﻿<%@ Page Title="Altairis List Manager" Language="C#" MasterPageFile="~/Pages/Site.Master" AutoEventWireup="true" CodeBehind="HomePage.aspx.cs" Inherits="Altairis.MailToolkit.ListManager.Pages.HomePage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="server">
    <h1><asp:Localize runat="server" Text="Subscribe or remove yourself" /></h1>
    <asp:MultiView ID="MultiViewPage" runat="server" ActiveViewIndex="0">
        <asp:View ID="ViewForm" runat="server">
            <div class="form">
                <p>
                    <asp:Label Text="E-mail address:" runat="server" AssociatedControlID="EmailAddressTextBox" />
                    <asp:RequiredFieldValidator runat="server" ControlToValidate="EmailAddressTextBox" Display="None" ErrorMessage="E-mail address is missing" />
                    <asp:RegularExpressionValidator runat="server" ControlToValidate="EmailAddressTextBox" Display="None" ErrorMessage="E-mail address is invalid" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />
                    <br />
                    <asp:TextBox ID="EmailAddressTextBox" runat="server" />
                </p>
                <p>
                    <asp:Label Text="List name:" runat="server" AssociatedControlID="ListName" />
                    <br />
                    <asp:DropDownList ID="ListName" runat="server" />
                </p>
                <p>
                    <asp:Label Text="Operation:" runat="server" AssociatedControlID="ListOperation" />
                    <br />
                    <asp:DropDownList ID="ListOperation" runat="server">
                        <asp:ListItem Value="SUB" Text="subscribe (add to list)" />
                        <asp:ListItem Value="REM" Text="unsubscibe (remove from list)" />
                    </asp:DropDownList>
                </p>
                <div class="buttons">
                    <asp:ValidationSummary runat="server" />
                    <asp:Button ID="SubmitButton" Text="Submit" runat="server" OnClick="SubmitButton_Click" />
                </div>
            </div>
        </asp:View>
        <asp:View ID="ViewMessage" runat="server">
            <div class="form">
                <p><asp:Literal ID="LiteralMessage" runat="server" /></p>
                <div class="buttons">
                    <asp:Button ID="BackButton" Text="Back" runat="server" OnClick="BackButton_Click" CausesValidation="false" />
                </div>
            </div>
        </asp:View>
    </asp:MultiView>
</asp:Content>
